if(ENABLE_TESTING)  
  # Please place additional tests in alphabetical order
  find_package(Boost 1.57.0 REQUIRED COMPONENTS unit_test_framework)
  option(ENABLE_HIGH_MEMORY_TESTS "Build and run tests, which needs lot of memory" ON)
  list(APPEND test_cases test_adiis)
  list(APPEND test_cases test_aobasis)
  list(APPEND test_cases test_aomatrix)
  list(APPEND test_cases test_aomatrix3d)
  list(APPEND test_cases test_aotransform)
  list(APPEND test_cases test_aopotential)
  list(APPEND test_cases test_atom)
  list(APPEND test_cases test_qmatom)
  list(APPEND test_cases test_polarsegment)
  list(APPEND test_cases test_qmmolecule)
  list(APPEND test_cases test_basisset)
  list(APPEND test_cases test_bfgs-trm)
  list(APPEND test_cases test_bse)
  list(APPEND test_cases test_convergenceacc)
  list(APPEND test_cases test_dftcoupling)
  list(APPEND test_cases test_diis)
  list(APPEND test_cases test_eigen)
  list(APPEND test_cases test_eris)
  list(APPEND test_cases test_espfit)
  list(APPEND test_cases test_glink)
  list(APPEND test_cases test_hdf5)
  list(APPEND test_cases test_cubefile_writer)
  list(APPEND test_cases test_densityintegration)
  list(APPEND test_cases test_vxc_potential)
  list(APPEND test_cases test_vxc_grid)
  list(APPEND test_cases test_regular_grid)
  list(APPEND test_cases test_orbitals)
  list(APPEND test_cases test_polarsite)
  list(APPEND test_cases test_ppm)
  list(APPEND test_cases test_qmnblist)
  list(APPEND test_cases test_qmpair)
  list(APPEND test_cases test_qmstate)
  list(APPEND test_cases test_radial_euler_maclaurin_rule)
  list(APPEND test_cases test_rpa)
  list(APPEND test_cases test_rpa_h2p)
  list(APPEND test_cases test_segment)
  list(APPEND test_cases test_aoshell)
  if(ENABLE_HIGH_MEMORY_TESTS)
    list(APPEND test_cases test_sphere_lebedev_rule)
  endif()
  list(APPEND test_cases test_sphere_lebedev_rule_fine)
  list(APPEND test_cases test_sphere_lebedev_rule_xfine)
  list(APPEND test_cases test_statetracker)
  list(APPEND test_cases test_symmetric_matrix)
  list(APPEND test_cases test_threecenter_dft)
  list(APPEND test_cases test_threecenter_gwbse)
  list(APPEND test_cases test_topology)
  list(APPEND test_cases test_sigma_exact)
  list(APPEND test_cases test_sigma_ppm)
  list(APPEND test_cases test_gw)
  list(APPEND test_cases test_bse_operator)
  list(APPEND test_cases test_davidson)
  list(APPEND test_cases test_trustregion)
  list(APPEND test_cases test_gnode)
  list(APPEND test_cases test_vc2index)
  list(APPEND test_cases test_grid)
  list(APPEND test_cases test_segmentmapper)
  list(APPEND test_cases test_eeinteractor)
  list(APPEND test_cases test_hist)
  list(APPEND test_cases test_qmfragment)
  list(APPEND test_cases test_jobtopology)
  list(APPEND test_cases test_dipoledipoleinteraction)
  list(APPEND test_cases test_populationanalysis)
  list(APPEND test_cases test_orca)
  list(APPEND test_cases test_dftengine)
  list(APPEND test_cases test_bsecoupling)
  list(APPEND test_cases test_rate_engine)
  list(APPEND test_cases test_fourcenter)  
  list(APPEND test_cases test_DeltaQ_filter)
  list(APPEND test_cases test_oscillatorstrength_filter)
  list(APPEND test_cases test_localisation_filter)
  list(APPEND test_cases test_density_filter)
  list(APPEND test_cases test_overlap_filter)
  list(APPEND test_cases test_newton_rapson)
  list(APPEND test_cases test_indexparser)
  list(APPEND test_cases test_settings)
  if(USE_CUDA)
    list(APPEND test_cases test_cudapipeline)
    list(APPEND test_cases test_cudamatrix)    
  endif()
  list(APPEND test_cases test_anderson)

  foreach(PROG ${test_cases} )
    add_executable(unit_${PROG} ${PROG}.cc)
    target_link_libraries(unit_${PROG} votca_xtp Boost::unit_test_framework)
    target_compile_definitions(unit_${PROG} PRIVATE BOOST_TEST_DYN_LINK)
    add_test(unit_${PROG} unit_${PROG})
    # run tests for xtp (for coverage) as well
    set_tests_properties(unit_${PROG} PROPERTIES LABELS "xtp;votca;unit")
  endforeach(PROG)
endif()
